OpenCities Map Help

Assign Foreign Key with a Domain List

With the lookup table in place, a foreign key constraint is added to root table to ensure that the right column in the spatial table is tied to the values in the lookup table.

For example, in the case of the Street and the Street Type lookup tables:

ALTER TABLE STREET
ADD CONSTRAINT STREET_TYPE_LUT_FK
​FOREIGN KEY(Street_Type)
​REFERENCES STREET_TYPE_LUT(Type);

With the lookup table and the foreign key in place, during feature registration the foreign key relationship will be acknowledged by OpenCities Geospatial Administrator. As a consequence:

  1. The feature’s property will be of type ComboBox.

  2. A domain list entry will be added to the schema.

  3. The domain list will be populated.